﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="ACM_MAS_FISCAL_Period.aspx.cs" Inherits="KPIS.GERP.GAMS.APP.App_UI.Forms.ACM_MAS_FISCAL_Period" %>
<%@ Register src="../UserControls/DatePicker.ascx" tagname="DatePicker" tagprefix="uc1" %>
<asp:Content ID="Content2" runat="server" contentplaceholderid="head">
    <title>กำหนดงวดเดือน</title>
    <link href="../CssClass.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" src="../Scripts/DatePicker.js" type="text/jscript"></script>
</asp:Content>
<asp:Content ID="Body" runat="server" contentplaceholderid="ContentPlaceHolder1">
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="panelTool">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="panelTool" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="panelData" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="panelData">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="panelTool" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="panelData" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    
   <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="None" Skin="Outlook">
</telerik:RadAjaxLoadingPanel>

    <div class="moduleContent1000">
           <div class="moduleDivBottom1000">
                 <asp:Panel ID="panelTool" runat="server" CssClass="contentPaneDiv" Height="30px" ScrollBars="Auto" >
                      <div class = "RHeader" align = "center">
                             <%--<fieldset style= "width:350px;height:25px;">
                                  สมุดเงินฝากธนาคาร
                             </fieldset>--%> 
                         </div>    
                             <table cellpadding="0" cellspacing="0" align = "right" >
                               <tr>
                                        <td><asp:Label ID="lblStatus" runat="server" Text="สถานะของข้อมูล" ForeColor="Orange" Font-Size="Large" Font-Bold="true"></asp:Label></td>
                                        
                                        <td width="100px" class="controls">
                                            <asp:LinkButton ID="btnInsert" runat="server" CssClass="LinkButton" onclick="btnInsert_Click">
                                                <img alt="" id="imgInsert" runat="server" src="~/App_UI/Images/Buttons/AddRecord.gif" title="เพิ่มข้อมูลย่อย" width="17"/> เพิ่มข้อมูลใหม่
                                            </asp:LinkButton>
                                        </td>
                                        <td width="100px" class="controls">
                                            <asp:LinkButton ID="btnSave" runat="server" CssClass="LinkButton" onclick="btnSave_Click" CausesValidation="true">
                                                <img alt="" id="imgSave" runat="server" src="~/App_UI/Images/Buttons/saveDisk.gif" title="บันทึกข้อมูล" width="17"/> บันทึกข้อมูล
                                            </asp:LinkButton>                                            
                                        </td>
                                        <td width="100px" class="controls">
                                            <asp:LinkButton ID="btnCancel" runat="server" CssClass="LinkButton" onclick="btnCancel_Click" CausesValidation="False">
                                                <img alt="" id="imgCancel" runat="server" src="~/App_UI/Images/Buttons/Cancel.gif" title="ยกเลิกการแก้ไข" width="17"/> ยกเลิกการแก้ไข
                                            </asp:LinkButton>
                                        </td>
                               </tr>
                            </table> 
                 </asp:Panel>
           </div>
    </div>
    <div class="moduleContent1000">
              <div class="moduleDivBottom1000">
                 <asp:Panel ID="panelData" runat="server" CssClass="contentPaneDiv" Height="500px" ScrollBars="Auto" align = "center" >              
                      <table>
                          <tr>
                             <td>
                                      <telerik:RadGrid ID="grdFiscalPeriod" runat="server" AutoGenerateColumns="false"
                                                    AllowMultiRowEdit="false" AllowMultiRowSelection="true" ShowStatusBar="true"
                                                    Width="900px" Height="300px" AllowPaging="true" AllowFilteringByColumn="true"
                                                    GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;"
                                                    GroupingSettings-GroupContinuedFormatString=""
                                                    GroupingSettings-GroupContinuesFormatString=""
                                                    GroupingSettings-GroupSplitFormat=""
                                                    OnNeedDataSource="grdFiscalPeriod_NeedDataSource" 
                                                    OnItemCommand="grdFiscalPeriod_ItemCommand" align ="left">
                                                    <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" GroupLoadMode="Client"
                                                        DataKeyNames="fiscal_period" NoMasterRecordsText="< ไม่มีข้อมูล >" GroupsDefaultExpanded="true">
                                                        <RowIndicatorColumn>
                                                            <HeaderStyle Width="20px" />
                                                        </RowIndicatorColumn>
                                                        <ExpandCollapseColumn>
                                                            <HeaderStyle Width="20px" />
                                                        </ExpandCollapseColumn>
                                                        <Columns>   
                                                            <telerik:GridTemplateColumn HeaderText="แก้ไข" AllowFiltering="false" HeaderStyle-Width="40px" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center"> 
                                                                <FilterTemplate></FilterTemplate>
                                                                <ItemTemplate>&nbsp;&nbsp;&nbsp;
                                                                        <asp:ImageButton ID="cmdEdit" runat="server" CommandName="DataEdit"
                                                                            ImageUrl="~/App_UI/Images/Buttons/Edit.gif" 
                                                                            ToolTip="แก้ไขรายการ" width="17px" />
                                                                </ItemTemplate>
                                                            </telerik:GridTemplateColumn>
                                                            <telerik:GridTemplateColumn HeaderText="ลบ" AllowFiltering="false" HeaderStyle-Font-Bold="true" HeaderStyle-Width="40px" HeaderStyle-HorizontalAlign="Center">
                                                            <FilterTemplate></FilterTemplate>
                                                            <ItemTemplate>
                                                                    <asp:ImageButton ID="btnSave" runat="server" CommandName="Delete" ImageUrl="~/App_UI/Images/Buttons/Delete.gif"  ToolTip="ลบรายการเวอร์ชั่นที่เลือก" width="17px" OnClientClick="javascript: return confirm('ต้องการลบรายการนี้หรือไม่?');"/>
                                                            </ItemTemplate>
                                                            </telerik:GridTemplateColumn>
                                                            <telerik:GridBoundColumn DataField="fiscal_period" 
                                                                HeaderText="fiscal_period" UniqueName="fiscal_period"
                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                            </telerik:GridBoundColumn>
                                                            <telerik:GridBoundColumn DataField="fiscal_period_code" 
                                                                HeaderText="รหัสงวดบัญชี" UniqueName="fiscal_period_code"
                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="150px"
                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                            </telerik:GridBoundColumn>
                                                            <telerik:GridBoundColumn DataField="fiscal_period_name" 
                                                                HeaderText="ชื่องวดบัญชี" UniqueName="fiscal_period_name"
                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" 
                                                                HeaderStyle-Width="250px" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                            </telerik:GridBoundColumn>
                                                            <telerik:GridBoundColumn DataField="fiscal_start_date"
                                                                HeaderText="วันที่เริ่มต้น"
                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="77px" DataFormatString="{0:d}"
                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                            </telerik:GridBoundColumn>
                                                            <telerik:GridBoundColumn DataField="fiscal_end_date"
                                                                HeaderText="วันที่สิ้นสุด"
                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="77px" DataFormatString="{0:d}"
                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                            </telerik:GridBoundColumn>
                                                            <telerik:GridBoundColumn DataField="fiscal_period_remark"
                                                                HeaderText="หมายเหตุเพิ่มเติม"
                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                            </telerik:GridBoundColumn><%--HeaderStyle-Width="250px"--%>
                                                        </Columns>
                                                        <PagerStyle Mode="NumericPages" AlwaysVisible="true" 
                                                            FirstPageToolTip="กลับหน้าแรก" LastPageToolTip="ไปหน้าสุดท้าย" 
                                                            NextPagesToolTip="หน้าถัดไป" NextPageToolTip="หน้าถัดไป" 
                                                            PrevPagesToolTip="ย้อนกลับ" PrevPageToolTip="ย้อนกลับ" />
                                                    </MasterTableView>
                                            <GroupingSettings GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                                                GroupContinuedFormatString="" GroupContinuesFormatString="" 
                                                GroupSplitFormat="" />
                                            <ClientSettings EnableRowHoverStyle="True">
                                                <Selecting AllowRowSelect="true" />
                                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                            </ClientSettings>
                                    </telerik:RadGrid> 
                             </td>
                          </tr>
                          <tr>
                              <td align="center">  
                                   <table>
                                       <tr>
                                          <td>&nbsp;</td>
                                       </tr>
                                       <tr>
                                          <td align="left">
                                              <asp:Label ID="hfiscal_period_seq" runat = "server" Visible = "false" />
                                              <asp:Label ID="hStatus" runat ="server" Visible = "false" />
                                              <asp:Label ID="lblfiscal_period_code" runat ="server" Text ="รหัสงวดบัญชี :" Font-Bold="true"/>
                                          </td>
                                          <td>
                                              <telerik:RadTextBox ID="txtfiscal_period_code" runat="server" title="รหัสงวดบัญชี" Width="350" Enabled="false"></telerik:RadTextBox>
                                          </td>
                                       </tr>
                                       <tr>
                                          <td align="left">
                                              <asp:Label ID="lblfiscal_period_name" runat ="server" Text ="ชื่องวดบัญชี:" Font-Bold="true" />
                                          </td>
                                          <td>
                                              <telerik:RadTextBox ID="txtfiscal_period_name" runat="server" title="ชื่องวดบัญชี" Width="350" Enabled="false"></telerik:RadTextBox>
                                          </td>
                                       </tr>
                                       <tr>
                                          <td align="left">
                                              <asp:Label ID="lblfiscal_start_date" runat ="server" Text= "วันที่เริ่มต้น" Font-Bold ="true"/>
                                          </td>
                                          <td align ="left">
                                              
                                              <uc1:DatePicker ID="dtpStartDate" runat="server" />
                                              
                                          </td>
                                       </tr>
                                       <tr>
                                           <td align="left">
                                                <asp:Label ID="lblfiscal_end_date" runat = "server" Text = "วันที่สิ้นสุด" Font-Bold ="true"/>
                                           </td>
                                           <td align ="left">    
                                               <uc1:DatePicker ID="dtpEndDate" runat="server" />
                                           </td>
                                       </tr>
                                       <tr>
                                          <td align="left">
                                              <asp:Label ID="lblfiscal_period_remark" runat ="server" Text ="หมายเหตุเพิ่มเติม :" Font-Bold="true"/>
                                          </td>
                                          <td>
                                              <telerik:RadTextBox ID="txtfiscal_period_remark" runat="server" title="หมายเหตุเพิ่มเติม" Width="350" Enabled="false"></telerik:RadTextBox>
                                          </td>
                                       </tr>
                                   </table>
                              </td>
                          </tr>
                      </table>
                 </asp:Panel>
              </div>
    </div>                 
    
</asp:Content>

